package info.wf0913.blogger_service.controller;

import info.wf0913.blogger_core.bean.Result;
import info.wf0913.blogger_core.controller.BaseController;
import info.wf0913.blogger_service.bean.User;
import info.wf0913.blogger_service.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@Controller
@RequestMapping("/user")
public class UserController extends BaseController<UserService, User> {

    @Autowired
    UserService userService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public Result login(String username, String password){

//        User user = userService.selectByName(username);
//        if(user.getPassword().equals(password)){
//           return Result.ok();
//        }
        return Result.failure();

    }

}
